{include file="include:header" /}
<body class="fixed-sidebar full-height-layout gray-bg" >
    <!-- 会员列表 -->
    <div class="row wrapper border-bottom white-bg page-heading news-add">
        <div class="col-sm-4">
            <h2>{$title}</h2>
            <!-- 导航部分 -->
            <ol class="breadcrumb">
                <li><a href="{:url('admin/Index/home')}">主页</a></li>
                <li><a href="#">前台设置</a></li>
                <li><strong>{$title}</strong></li>
            </ol>
        </div>
        <div class="col-sm-8">
            <div class="title-action">
                <!-- 链接部分 -->
                <a href="{:url('admin/Front/news_list')}" class="btn btn-primary">咨讯列表</a>
            </div> 
        </div>
    </div>
    <!-- 分类列表 -->
    <div class="wrapper wrapper-content ">       
        <!-- 分类列表 -->
        <div class="ibox float-e-margins">
          
                    <div class="ibox-content">
                        <form method="post" class="valid-form form-horizontal" >
                            <!-- 基础信息 -->
                            <div class="panel panel-default">
                                <div class="panel-heading">基础信息</div>
                                <div class="panel-body">
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">咨讯标题</label>
                                        <div class="col-sm-4 vcheck-abs">
                                            <input type="text" class="form-control" name="n_title"  placeholder="咨讯标题" datatype="*" errormsg="咨讯标题" sucmsg=" " value="{$data['n_title']?$data['n_title']:''}"/>
                                        </div>
                                        <p class="text-danger">*必填</p>
                                    </div>

                                    <div class="hr-line-dashed"></div>
                                    <div class="form-group panic-buy">
                                        <label class="col-sm-2 control-label">咨讯分类</label>
                                        <div class="col-sm-2 form-inline">
                                            <select class="form-control m-b  type-classes" name="news_type_id" style="width: 245px;">
                                                {if condition="$data eq ''"}
                                                    {volist name="list" id="v"}
                                                    <option value="{$v['news_type_id']}" >{$v['nt_name']}</option>
                                                    {/volist}
                                                {else/}
                                                    {volist name="list" id="v"}
                                                    <option value="{$v['news_type_id']}" {if condition="$v['news_type_id'] eq $data['news_type_id']"}selected="selected"{/if}>{$v['nt_name']}</option>
                                                    {/volist}
                                                {/if}
                                            </select><p class="text-danger">*必填</p>
                                        </div>
                                    </div>

                                    <div class="hr-line-dashed"></div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">咨讯描述</label>
                                        <div class="col-sm-6 vcheck-abs">
                                            <textarea class="form-control" name="n_describe"  placeholder="咨讯描述" datatype="*" errormsg="请输入咨讯描述" sucmsg=" " >{$data['n_describe']?$data['n_describe']:''}</textarea>
                                        </div>
                                        <p class="text-danger">*必填</p>
                                    </div>
                                    
		                                       
		                            <div class="hr-line-dashed"></div>
		                            <div class="form-group panic-buy">
		                                <label class="col-sm-2 control-label">是否发布</label>
		                                <div class="col-sm-4 vcheck-abs form-inline">
                                            {if condition="$data eq ''"}
                                            <label class="gray-label ">是&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" class="form-control" name="n_state" value="2"  /></label>
                                            <label class="gray-label ">否&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" class="form-control" name="n_state" value="1" checked/></label>
                                            {else /}
                                            <label class="gray-label ">是&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" class="form-control" name="n_state" value="2"  {if condition="$data['n_state'] eq 2"}checked{/if}/></label>
                                            <label class="gray-label ">否&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" class="form-control" name="n_state" value="1" {if condition="$data['n_state'] eq 1"}checked{/if}/></label>
                                      <!--      <input type="hidden" name="news_img_as" value="{$data['n_img']}"/>-->
                                            {/if}
		                                  </div>
		                            </div> 
                                     
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">咨讯时间</label>
                                        <div class="col-sm-4 vcheck-abs">
                                           <input type="text" name="n_newstime" size="18" value="{$data['n_newstime']?$data['n_newstime']:''}"  placeholder="咨讯时间"  class="form-control" style="width: 140px;" onclick="laydate({istime: true, format: 'YYYY-MM-DD'})" />
                                            <p class="text-danger">*必填</p>
                                        </div>

                                    </div>                                  
                                              
                                                                                                     

                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">作者</label>
                                        <div class="col-sm-4 vcheck-abs">
                                            <input type="text" class="form-control" name="n_author"  placeholder="作者" datatype="*" errormsg="请输入作者" sucmsg=" " value="{$data['n_author']?$data['n_author']:''}" style="width: 140px;"/>
                                            <p class="text-danger">*必填</p>
                                        </div>
                                    </div>


                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">咨讯来源</label>
                                        <div class="col-sm-4 vcheck-abs">
                                            <input type="text" class="form-control" name="n_source"  placeholder="咨讯来源" datatype="*" errormsg="请输入咨讯来源" sucmsg=" " value="{$data['n_source']?$data['n_source']:'律团'}"/>
                                        </div>
                                        <p class="text-danger">*必填</p>
                                    </div>


                                    <div class="hr-line-dashed"></div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">咨讯显示图</label>
                                        <div class="col-sm-10">
                                            <div class="upload-pic-item">
                                                <div class="upload-pic square-min" style="width:150px;">
                                                    <div class="pic-wrap">
                                                        {if condition="$data eq ''"}
                                                        <img src="__PUBLIC__/Images/img.jpg" alt="" />
                                                        {else/}
                                                        {if condition="$data['n_img'] eq ''"}
                                                        <img src="__PUBLIC__/Images/img.jpg" alt="" />
                                                        {else/}
                                                        <img src="{$data['n_img']}" alt="" />
                                                        {/if}
                                                        {/if}
                                                    </div>
                                                    <div class="upload-btn">上传</div>
                                                    <div class="delete-pic-btn">删除</div>
                                                    <input class="pic-url" type="hidden" name="n_img" value="{$data['n_img']?$data['n_img']:''}" size="600,600" />
                                                </div>
                                            </div>
                                            <p class="text-danger">*必填;图片尺寸600*600</p>
                                        </div>
                                    </div>

                           <!-- 新闻内容 -->
                            <div class="panel panel-default add-estimate">
                                <div class="panel-heading add-estimate-name">咨讯内容</div>
                                <div class="panel-body">
               
                                    <div class="hr-line-dashed"></div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label" >内容</label>
                                        <div class="col-sm-8" >
                                            <!-- 加载编辑器 -->
                                            <script id="editor" name="n_content" type="text/plain">{$data['n_content']?$data['n_content']:''}</script>
                                        </div>
                                    </div>
                                    
                                </div>
                            </div>

                            <div class="form-group">
                                <div class="text-center">
                                    <input type="button"  class="btn btn-danger submit-news" value="确认提交"  />
                                    <input type="hidden" name="news_id"  value="{$data['news_id']?$data['news_id']:''}"/>
                                    <a class="mg-left-10 btn btn-white" href="javascript:location.reload();" alt="重置">重置</a>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>

    </div>

</body>
</html>
{include file="include:js" /}